/** FASSIT (Forms of Selective Attention in Intelligent Transportation Systems)
 * Computational Creativity and Digital Media
 * Cognitive and Media Systems Group
 * Centre for Informatics and Systems of the University of Coimbra (CISUC)
 *
 * Copyright (c) 2010-2013 University of Coimbra, Portugal
 * All rights reserved.
 */
package androidLayer.Mysql;

import java.util.HashMap;

import masterAgent.Knowledge.MasterAgent;

import poi.Info.POI;
import poi.Info.POIwithSAMetrics;
import poi.Surprise.Surprise;
import poi.Uncertainty.Uncertainty;

import agent.Context.Context;
import agent.Context.Goal;
import agent.Knowledge.Agent;
import agent.Metrics.Surprise.PastSurpriseValues;
import agent.Metrics.Surprise.SurpriseEvaluator;
import agent.Metrics.Uncertainty.PastUncertaintyValues;
import agent.Metrics.Uncertainty.UncertaintyEvaluator;
import androidLayer.PointsOfInterestByGoal;


/**
 *
 * 
 * @author Hernani Costa
 *
 * @version 
 */
public class MysqlManager {
	MysqlConnection clientConnection;

	
	public MysqlManager(){
		clientConnection = new MysqlConnection();
	}
	
	public boolean createUserModel(String email){
		return clientConnection.createUserModel(email);
	}
	
	public boolean verifyUser(String email, String password){
		return clientConnection.verifyUser(email, password);
	}
	public String encodeEmail(String email){
		return clientConnection.encodeEmail(email);
	}
	
	public String decodeEmail(String string){
		return clientConnection.decodeEmail(string);
	}
	
	public void addUser(String email, String password){
		clientConnection.addUser(email, password);
	}
	
	public void saveUserFeedback(){
		clientConnection.saveUserFeedback();
	}
	
	public PastSurpriseValues getSurpriseValuesForGoal(String email, String goal){
		return clientConnection.getSurpriseValuesForGoal(email, goal);
	}
	
	
	public PastUncertaintyValues getUncertaintyValuesForGoal(String email, String goal){
		return clientConnection.getUncertaintyValuesForGoal(email, goal);
	}
	
//	public boolean login(String email, String password) {
//		email = clientConnection.encodeEmail(email);
//		boolean exists = clientConnection.verifyUser(email, password);
//		if (exists) {
//			// load past 
//			System.out.println("load do model");
//		} else {
//			clientConnection.addUser(email, password);
//			clientConnection.createUserModel(email);
//			//
//		}
//		
//		return exists;
//	}
	
	
	
	
}
